﻿
using BootstrapBlazor.Components;
using Microsoft.Extensions.Localization;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;


namespace CodeMan.Models
{
    /// <summary>
    /// 实体类
    /// </summary>
    public class ClassDTO
    { 
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [Display(Name = "主键")]
        [AutoGenerateColumn(Ignore = true)]
        public int Id { get; set; }
        /// <summary>
        /// 类名
        /// </summary> 
        [AutoGenerateColumn(Order = 1, Filterable = true, Sortable = true)]
        public string Name { get; set; }
        /// <summary>
        /// 说明
        /// </summary>
        [AutoGenerateColumn(Order = 2, Filterable = true, Sortable = true)]
        public string Desc { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        [AutoGenerateColumn(Order = 3, Sortable = true)]
        public string Type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [DisplayName("是/否")]
        [AutoGenerateColumn(Order = 30, Width = 70, ComponentType = typeof(Switch))]
        public bool Complete { get; set; }= true;
        /// <summary>
        /// 字段集合
        /// </summary>
        [AutoGenerateColumn(Ignore = true)] 
        public List<ClassAttribute> Attributes { get; set; } = new List<ClassAttribute>(); 

    }
}
